def interval_multi_for(m, n):
    if m >= n:
        return "输入参数不符合要求"
    if m <= 0:
        return "输入参数不符合要求"
    total = 1
    for i in range(m, n + 1):
        total = total * i
    return total


def interval_multi_while(m, n):
    if m >= n:
        return "输入参数不符合要求"
    if m <= 0:
        return "输入参数不符合要求"
    total = 1
    temp = m
    while temp <= n:
        total = total * temp
        temp = temp + 1
    return total


num1 = input("请输入一个m整数:")
num2 = input("请输入一个n整数:")
total1 = interval_multi_for(int(num1), int(num2))
total2 = interval_multi_while(int(num1), int(num2))
print(total1)
print(total2)
